import java.util.Arrays;
import java.util.Scanner;

public class BinaryInsertSort {
    public static void main(String args[]) {
        Scanner in=new Scanner(System.in);
        int len =in.nextInt();
        int[] arr=new int[len];
        for (int i=0; i<len; i++) {
            arr[i]=in.nextInt();
        }
        quicksort(arr,0,len-1);
        System.out.println(Arrays.toString(arr));
    }

    public static   void quicksort(int[] arr, int low ,int high){
        if (low<high) {
            int p=partation(arr,low,high);
            quicksort(arr,low,p-1);
            quicksort(arr,p+1,high);
        }
    }

    public static  int partation(int[] arr,int low ,int high){
        int tmp=arr[low];
        while (low<high) {
            while (low<high && arr[high]>tmp) {
              high--;  
            }
            arr[low]=arr[high];

            while (low<high && arr[low]<tmp) {
                low++;
            }

            arr[high]=arr[low];
        }

        arr[low]=tmp;
        return low;
    }
}
